package com.zkzx.wlhy.adaptor.clinet.truck;

import com.zkzx.wlhy.adaptor.clinet.ResultVO;
import com.zkzx.wlhy.adaptor.config.feign.FeignConfiguration;
import com.zkzx.wlhy.adaptor.controller.truck.param.TruckDTO;
import com.zkzx.wlhy.adaptor.controller.truck.vo.WlhyTruckVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.Valid;

/**
 * 北京中科智兴物联科技有限公司 @版权所有
 *
 * @Author: zhaoyihe@zkraising.com
 * @Date: 2021/05/21/10:33
 * @Description:
 */
@FeignClient(name = "WLHY-TRUCK",url = "${wh.website}",configuration = FeignConfiguration.class)
public interface TruckClient {


    @GetMapping("/push/car/getCar")
    ResultVO<WlhyTruckVO> getTruck(@RequestParam("plateNumber") String  plateNumber);

    @PostMapping("/push/car/addCar")
    ResultVO add(@RequestBody @Valid TruckDTO truckDTO);

    @GetMapping("/push/car/getCarState")
    ResultVO<String> getStatus(@RequestParam("id") String id);

}
